package com.ruoyi.constant.v3;

/**
 * V3版本角色枚举
 *
 * @author: Gao Tianle
 * @date: 2024-02-26 09:32
 **/
public enum RoleV3Enum {

    ADMIN("admin","超级管理员"),
    MANAGER("manager","管理员"),
    YWRY("business_personnel","业务人员"),
    SHRY("audit_personnel","审核人员"),
    PDRY("decide_personnel","判定人员"),
    YWHCRY("field_inspector","野外核查人员");
//    YWSHRY("field_auditor","野外审核人员");

    private String code;
    private String desc;

    RoleV3Enum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(String code) {
        for (RoleV3Enum value : RoleV3Enum.values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return null;
    }
}
